<%@page import="com.spartancoder.accommodation.models.University" %>
<%@page import="com.spartancoder.accommodation.beans.UniversityBean" %>
<%
UniversityBean ub = University.fetch(Integer.parseInt(request.getParameter("id")));
ub.setAvailable(!ub.isAvailable());
University.update(ub);
session.setAttribute("flash", "Starea a fost schimbata");
response.sendRedirect("list-university.jsp");
%>